using System;
using System.Runtime.InteropServices;
using Avalonia.Controls;

namespace AppWindowTheme.Controls;

public class AppWindow : Window
{
    protected override Type StyleKeyOverride => typeof(AppWindow);

    protected AppWindow()
    {
        if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
            PseudoClasses.Add(":windows");
        else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
            PseudoClasses.Add(":mac");
        else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
            PseudoClasses.Add(":linux");
        else
            throw new Exception();
    }
}